Package-level declarations

Types

Link copied to clipboard
data class ZeroXAllowanceIssue(val actual: String, val spender: String)

Allowance issue details.

Link copied to clipboard
data class ZeroXBalanceIssue(val token: String, val actual: String, val expected: String)

Balance issue details.

Link copied to clipboard
data class ZeroXFeeDetail(val amount: String? = null, val token: String? = null, val type: String? = null)

Generic fee detail.

Link copied to clipboard
data class ZeroXFees(val integratorFee: ZeroXFeeDetail? = null, val integratorFees: List<ZeroXFeeDetail>? = null, val zeroExFee: ZeroXZeroExFeeDetail? = null, val gasFee: ZeroXFeeDetail? = null)

Fee information for a ZeroX swap.

Link copied to clipboard
data class ZeroXFill(val from: String, val to: String, val source: String, val proportionBps: String)

A single fill in a swap route.

Link copied to clipboard
data class ZeroXIssues(val allowance: ZeroXAllowanceIssue? = null, val balance: ZeroXBalanceIssue? = null, val simulationIncomplete: Boolean? = null, val invalidSourcesPassed: List<String>? = null)

Issues detected during quote/price request.

Link copied to clipboard
data class ZeroXPriceRawResponse(val blockNumber: String? = null, val buyAmount: String, val buyToken: String? = null, val fees: ZeroXFees? = null, val gas: String? = null, val gasPrice: String? = null, val issues: ZeroXIssues? = null, val liquidityAvailable: Boolean? = null, val minBuyAmount: String? = null, val route: ZeroXRoute? = null, val sellAmount: String, val sellToken: String? = null, val tokenMetadata: ZeroXTokenMetadata? = null, val totalNetworkFee: String? = null)

Raw response from the ZeroX price endpoint. Contains all swap price details without transaction data.

Link copied to clipboard
data class ZeroXPriceRequest(val chainId: String, val buyToken: String, val sellToken: String, val sellAmount: String, val txOrigin: String? = null, val swapFeeRecipient: String? = null, val swapFeeBps: Int? = null, val swapFeeToken: String? = null, val tradeSurplusRecipient: String? = null, val gasPrice: String? = null, val slippageBps: Int? = null, val excludedSources: String? = null, val sellEntireBalance: String? = null)

Request model for getting a price quote from ZeroX (without transaction data). All optional parameters can be used to customize the price request.

Link copied to clipboard
data class ZeroXPriceResponse(val data: ZeroXPriceResponseData? = null, val error: String? = null)

Response model for ZeroX price request. Similar to quote response but without transaction data.

Link copied to clipboard
data class ZeroXPriceResponseData(val rawResponse: ZeroXPriceRawResponse)

Data wrapper for ZeroX price response.

Link copied to clipboard
data class ZeroXQuoteRawResponse(val blockNumber: String? = null, val buyAmount: String, val buyToken: String? = null, val fees: ZeroXFees? = null, val issues: ZeroXIssues? = null, val liquidityAvailable: Boolean? = null, val minBuyAmount: String? = null, val route: ZeroXRoute? = null, val sellAmount: String, val sellToken: String? = null, val tokenMetadata: ZeroXTokenMetadata? = null, val totalNetworkFee: String? = null, val transaction: ZeroXTransaction)

Raw response from the ZeroX quote endpoint. Contains all swap details including the transaction to execute.

Link copied to clipboard
data class ZeroXQuoteRequest(val chainId: String, val buyToken: String, val sellToken: String, val sellAmount: String, val txOrigin: String? = null, val swapFeeRecipient: String? = null, val swapFeeBps: Int? = null, val swapFeeToken: String? = null, val tradeSurplusRecipient: String? = null, val gasPrice: String? = null, val slippageBps: Int? = null, val excludedSources: String? = null, val sellEntireBalance: String? = null)

Request model for getting a swap quote from ZeroX. All optional parameters can be used to customize the quote request.

Link copied to clipboard
data class ZeroXQuoteResponse(val data: ZeroXQuoteResponseData? = null, val error: String? = null)

Response model for ZeroX quote request.

Link copied to clipboard
data class ZeroXQuoteResponseData(val rawResponse: ZeroXQuoteRawResponse)

Data wrapper for ZeroX quote response.

Link copied to clipboard
data class ZeroXRoute(val fills: List<ZeroXFill>? = null, val tokens: List<ZeroXRouteToken>? = null)

Route information for a swap.

Link copied to clipboard
data class ZeroXRouteToken(val address: String, val symbol: String)

Token information in a route.

Link copied to clipboard
data class ZeroXSourcesData(val rawResponse: ZeroXSourcesRawResponse)

Data wrapper for ZeroX sources response.

Link copied to clipboard
data class ZeroXSourcesRawResponse(val sources: List<String>, val zid: String)

Raw response from the ZeroX sources endpoint.

Link copied to clipboard
data class ZeroXSourcesRequest(val chainId: String, val zeroXApiKey: String? = null)

Request model for getting available swap sources from ZeroX.

Link copied to clipboard
data class ZeroXSourcesResponse(val data: ZeroXSourcesData? = null, val error: String? = null)

Response model for ZeroX sources request.

Link copied to clipboard
data class ZeroXTokenMetadata(val buyToken: ZeroXTokenTaxMetadata? = null, val sellToken: ZeroXTokenTaxMetadata? = null)

Token metadata including tax information.

Link copied to clipboard
data class ZeroXTokenTaxMetadata(val buyTaxBps: String? = null, val sellTaxBps: String? = null, val transferTaxBps: String? = null)

Tax metadata for a token.

Link copied to clipboard
data class ZeroXTransaction(val data: String, val from: String, val gas: String, val gasPrice: String, val to: String, val value: String)

Transaction data for executing a swap.

Link copied to clipboard
data class ZeroXZeroExFeeDetail(val billingType: String? = null, val feeAmount: String? = null, val feeToken: String? = null, val feeType: String? = null)

ZeroEx-specific fee detail.